home *** CD-ROM | disk | FTP | other *** search
/ Experimental BBS Explossion 3 / Experimental BBS Explossion III.iso / c / pcw.zip / PCWEXIT.C < prev    next >
Text File  |  1990-01-16  |  1KB  |  31 lines

  1. /***********************************************************/
  2. /* File Id.                  Pcwexit.C.                    */
  3. /* Author.                   Stan Milam.                   */
  4. /* Date Written.             09/08/89.                     */
  5. /*                                                         */
  6. /*           (c) Copyright 1989-90 by Stan Milam           */
  7. /*                                                         */
  8. /* Comments: Routine to remove all active windows when a   */
  9. /* program terminates if PCW was initialized by default or */
  10. /* an explicit pcwinit(AUTOEXIT) was made.  This routine   */
  11. /* can be circumvented by making an explicit call to       */
  12. /* pcwinit() with a value of NOEXIT before any other PCW   */
  13. /* function is called.  This routine is invoked either     */
  14. /* explicitly by the application program or automatically  */
  15. /* by the ANSI standard function atexit().                 */
  16. /***********************************************************/
  17.  
  18. #include <stdio.h>
  19. #include "pcwproto.h"
  20.  
  21. void _pcw_exit(void) {
  22.  
  23.    WNDPTR *wnd;
  24.  
  25.    wnd = get_active_wnd();
  26.    while (wnd != NULL) {
  27.        wnd = wpop(wnd);
  28.        wnd = get_active_wnd();
  29.    }
  30. }
  31.